package org.dromara.shopping.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.dromara.shopping.domain.dto.FromatDetailDto;
import org.dromara.shopping.domain.dto.ProductFormatDto;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import java.io.Serial;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 商品对象 product
 *
 * @author Mr.Zhou
 * @date 2024-10-21
 */
@Data
@TableName("apple_product")
public class Product implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 商品图片
     */
    private String image;

    /**
     * 商品简介
     */
    private String storeInfo;

    /**
     * 分类id
     */
    private Integer cateId;

    /**
     * 展示价格
     */
    private String labelPrice;

    /**
     * 规格 0单 1多
     */
    private Integer specType;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 状态（0：未上架，1：上架）
     */
    private Integer state;

    /**
     * 产品描述
     */
    private String description;

    /**
     * 购买须知
     */
    private String buyingTips;

    /**
     * 是否删除
     */
    private Integer isDel;

    /**
     *  添加时间
     */
    private Date createTime;


    /**
     * 商品图片
     */
    @TableField(exist = false)
    private String imagePath;

    @TableField(exist = false)
    private List<String> sliderImageArray;

    @TableField(exist = false)
    private String sliderImagePath;

    //属性项目
    @TableField(exist = false)
    private List<FromatDetailDto> items;

    @TableField(exist = false)
    private ProductRule rule;

    //sku结果集
    @TableField(exist = false)
    private List<ProductFormatDto> attrs;

    @TableField(exist = false)
    private List<ProductAttr> productAttr;

    @TableField(exist = false)
    private Map<String, ProductAttrValue> productValue = new LinkedHashMap<>();

    @TableField(exist = false)
    private List<Integer> estateIds;

    @TableField(exist = false)
    private String cateChildName;

    @TableField(exist = false)
    private String cateName;

    @TableField(exist = false)
    private Integer orderSort;

    @TableField(exist = false)
    private List<ProductImg> productImgs;

    @TableField(exist = false)
    private List<ProductImg> productImgLunbos;

}
